HAL FMAC migration: List of applicable concepts ¶
This section provides information about the HAL FMAC applicable architecture concepts.
Concepts for FMAC ¶
|
Concept |
Description |
|---|---|
|
The initialization has been split into separate initialization and configfiguration functions:
|
|
|
Removal and conversion of init structure to configuration structure |
The initialization structure
|
|
The handle structure has been renamed to
|
|
|
|
|
|
New APIs are available to get and set FMAC features. |
|
|
The
|
|
|
Two functions to set/get user data are available:
|
|
|
Individual callback registration APIs replace global register and unregister functions |
The callback registration is handled by specific functions for each FMAC event. These functions are used to register callback functions for different FMAC events. |
|
|
|
|
All hardware macros have been removed from the HAL FMAC driver, and equivalent services are ensured through the LL APIs. |
|
|
The FMAC state machine is reworked to ensure transitions of the peripheral functional states. |
|
|
The HAL FMAC functions were updated to return:
|
|
|
Involves redesigning the error handling mechanisms within the HAL to improve the detection, reporting, and handling of errors. |
|
|
New APIs for filtering optional asynchronous process interrupts |
New HAL FMAC Write and Read data APIs with interrupt filtering capability, such as
|
|
All TypeDef parts of the HAL FMAC driver have been removed and replaced by
|
|
|
Const keywords have been added to non-modifiable pointers to ensure that either the pointer itself or the data it points to cannot be modified. This enhances code safety and readability, prevents unintended modifications, and renders code more robust and maintainable. |
|
|
The parameters and state are checked using
|
|
|
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels. |
Finite parameters (including FMAC instances) have been converted into enumerated types (enums) at HAL level. This improves code readability, maintainability, and type safety. |
|
In HAL2, the implementation of
|
|
|
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions). |
All HAL FMAC functions start with
|
Other HAL FMAC changes ¶
|
Concept |
Consideration |
|---|---|
|
Mix DMA / IT / Polling in the same functions. |
|
|
Rework the configuration and processing APIs: |
|